<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OpenLoong Dynamics Control: MJ_interface.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OpenLoong Dynamics Control
   &#160;<span id="projectnumber">v0.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_9169b0cb79af44479f94c9d6f96547ce.html">sim_interface</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">MJ_interface.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">This is part of OpenLoong Dynamics Control, an open project for the control of biped robot,</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">Copyright (C) 2024 Humanoid Robot (Shanghai) Co., Ltd, under Apache 2.0.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">Feel free to use in any purpose, and cite OpenLoong-Dynamics-Control in any style, to contribute to the advancement of the community.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> &lt;https://gitee.com/panda_23/openloong-dyn-control.git&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> &lt;web@openloong.org.cn&gt;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160; </div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;mujoco/mujoco.h&gt;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;data_bus.h&quot;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="classMJ__Interface.html">   19</a></span>&#160;<span class="keyword">class </span><a class="code" href="classMJ__Interface.html">MJ_Interface</a></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;{</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a5e8510564e538fa386a818f6f96a5121">   22</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classMJ__Interface.html#a5e8510564e538fa386a818f6f96a5121">jointNum</a>{0};                   </div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a3323cee5ccf158f098d43752aa0c749c">   23</a></span>&#160;    std::vector&lt;double&gt; <a class="code" href="classMJ__Interface.html#a3323cee5ccf158f098d43752aa0c749c">motor_pos</a>;     </div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a2c2a122a4aa9542421e227e6c1722e3e">   24</a></span>&#160;    std::vector&lt;double&gt; <a class="code" href="classMJ__Interface.html#a2c2a122a4aa9542421e227e6c1722e3e">motor_pos_Old</a>; </div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#ad6b575d76a968ffdda312686be04b826">   25</a></span>&#160;    std::vector&lt;double&gt; <a class="code" href="classMJ__Interface.html#ad6b575d76a968ffdda312686be04b826">motor_vel</a>;     </div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a62d68e65d389ff62f9c7c95f786f094c">   26</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classMJ__Interface.html#a62d68e65d389ff62f9c7c95f786f094c">rpy</a>[3]{0};                  </div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a14cefc3f8d3c18ed5b2c435ac7d959ea">   27</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classMJ__Interface.html#a14cefc3f8d3c18ed5b2c435ac7d959ea">baseQuat</a>[4]{0};             </div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#ab67f241caf2e6ca0388154a2c578d624">   28</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classMJ__Interface.html#ab67f241caf2e6ca0388154a2c578d624">f3d</a>[3][2]{0};               </div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a91f7d6a50267e9ff1537328a40d68775">   29</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classMJ__Interface.html#a91f7d6a50267e9ff1537328a40d68775">basePos</a>[3]{0};              </div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a80db73384f82c7fc7509a66e35df0a23">   30</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classMJ__Interface.html#a80db73384f82c7fc7509a66e35df0a23">baseAcc</a>[3]{0};              </div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a021529e1a992fa8c4151a3c61b952056">   31</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classMJ__Interface.html#a021529e1a992fa8c4151a3c61b952056">baseAngVel</a>[3]{0};           </div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a515b7c4b0412a629fd8e2d8b7ff82012">   32</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classMJ__Interface.html#a515b7c4b0412a629fd8e2d8b7ff82012">baseLinVel</a>[3]{0};           </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a5cde9d9e1ab09a14e228a5df57e327f7">   34</a></span>&#160;    <span class="keyword">const</span> std::vector&lt;std::string&gt; <a class="code" href="classMJ__Interface.html#a5cde9d9e1ab09a14e228a5df57e327f7">JointName</a> = {<span class="stringliteral">&quot;J_arm_l_01&quot;</span>, <span class="stringliteral">&quot;J_arm_l_02&quot;</span>, <span class="stringliteral">&quot;J_arm_l_03&quot;</span>, <span class="stringliteral">&quot;J_arm_l_04&quot;</span>, <span class="stringliteral">&quot;J_arm_l_05&quot;</span>,</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;                                                <span class="stringliteral">&quot;J_arm_l_06&quot;</span>, <span class="stringliteral">&quot;J_arm_l_07&quot;</span>, <span class="stringliteral">&quot;J_arm_r_01&quot;</span>, <span class="stringliteral">&quot;J_arm_r_02&quot;</span>, <span class="stringliteral">&quot;J_arm_r_03&quot;</span>,</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;                                                <span class="stringliteral">&quot;J_arm_r_04&quot;</span>, <span class="stringliteral">&quot;J_arm_r_05&quot;</span>, <span class="stringliteral">&quot;J_arm_r_06&quot;</span>, <span class="stringliteral">&quot;J_arm_r_07&quot;</span>,</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;                                                <span class="stringliteral">&quot;J_head_yaw&quot;</span>, <span class="stringliteral">&quot;J_head_pitch&quot;</span>, <span class="stringliteral">&quot;J_waist_pitch&quot;</span>, <span class="stringliteral">&quot;J_waist_roll&quot;</span>, <span class="stringliteral">&quot;J_waist_yaw&quot;</span>,</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;                                                <span class="stringliteral">&quot;J_hip_l_roll&quot;</span>, <span class="stringliteral">&quot;J_hip_l_yaw&quot;</span>, <span class="stringliteral">&quot;J_hip_l_pitch&quot;</span>, <span class="stringliteral">&quot;J_knee_l_pitch&quot;</span>,</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;                                                <span class="stringliteral">&quot;J_ankle_l_pitch&quot;</span>, <span class="stringliteral">&quot;J_ankle_l_roll&quot;</span>, <span class="stringliteral">&quot;J_hip_r_roll&quot;</span>, <span class="stringliteral">&quot;J_hip_r_yaw&quot;</span>,</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                                                <span class="stringliteral">&quot;J_hip_r_pitch&quot;</span>, <span class="stringliteral">&quot;J_knee_r_pitch&quot;</span>, <span class="stringliteral">&quot;J_ankle_r_pitch&quot;</span>, <span class="stringliteral">&quot;J_ankle_r_roll&quot;</span>}; <span class="comment">// joint name in XML file, the corresponds motors name should be M_*, ref to line 29 of MJ_Interface.cpp</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a6e59db58240c350c3e5fdaa1addcc969">   41</a></span>&#160;    <span class="keyword">const</span> std::string <a class="code" href="classMJ__Interface.html#a6e59db58240c350c3e5fdaa1addcc969">baseName</a> = <span class="stringliteral">&quot;base_link&quot;</span>;                                                                            </div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#aa3e4c8f5df56bd3407a04c0ae6a15d79">   42</a></span>&#160;    <span class="keyword">const</span> std::string <a class="code" href="classMJ__Interface.html#aa3e4c8f5df56bd3407a04c0ae6a15d79">orientationSensorName</a> = <span class="stringliteral">&quot;baselink-quat&quot;</span>;                                                           </div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#ab5e87c8106ed161dbb4533f20cc35057">   43</a></span>&#160;    <span class="keyword">const</span> std::string <a class="code" href="classMJ__Interface.html#ab5e87c8106ed161dbb4533f20cc35057">velSensorName</a> = <span class="stringliteral">&quot;baselink-velocity&quot;</span>;                                                               </div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a47e131e382abab397483dfe54045d07b">   44</a></span>&#160;    <span class="keyword">const</span> std::string <a class="code" href="classMJ__Interface.html#a47e131e382abab397483dfe54045d07b">gyroSensorName</a> = <span class="stringliteral">&quot;baselink-gyro&quot;</span>;                                                                  </div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classMJ__Interface.html#a12b68aed8f3ca981ce80aae25d5c9073">   45</a></span>&#160;    <span class="keyword">const</span> std::string <a class="code" href="classMJ__Interface.html#a12b68aed8f3ca981ce80aae25d5c9073">accSensorName</a> = <span class="stringliteral">&quot;baselink-baseAcc&quot;</span>;                                                                </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <a class="code" href="classMJ__Interface.html#a8673f6877a73148a67de90726d77e01a">MJ_Interface</a>(mjModel *mj_modelIn, mjData *mj_dataIn);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classMJ__Interface.html#af70216da714e571369d9d176571590a6">updateSensorValues</a>();</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classMJ__Interface.html#a820f45e54c3d726aa5631c2acfcf6cbd">setMotorsTorque</a>(std::vector&lt;double&gt; &amp;tauIn);</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classMJ__Interface.html#ac13217e183325898b7a7e184470562f0">dataBusWrite</a>(<a class="code" href="structDataBus.html">DataBus</a> &amp;busIn);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    mjModel *mj_model;  </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    mjData  *mj_data;   </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    std::vector&lt;int&gt; jntId_qpos, jntId_qvel, jntId_dctl;    </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keywordtype">int</span> orientataionSensorId;   </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordtype">int</span> velSensorId;            </div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordtype">int</span> gyroSensorId;           </div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordtype">int</span> accSensorId;            </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordtype">int</span> baseBodyId;             </div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordtype">double</span> timeStep{0.001};     </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordtype">bool</span> isIni{<span class="keyword">false</span>};          </div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;};</div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclassMJ__Interface_html_a5cde9d9e1ab09a14e228a5df57e327f7"><div class="ttname"><a href="classMJ__Interface.html#a5cde9d9e1ab09a14e228a5df57e327f7">MJ_Interface::JointName</a></div><div class="ttdeci">const std::vector&lt; std::string &gt; JointName</div><div class="ttdoc">joint names list</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00034">MJ_interface.h:34</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a820f45e54c3d726aa5631c2acfcf6cbd"><div class="ttname"><a href="classMJ__Interface.html#a820f45e54c3d726aa5631c2acfcf6cbd">MJ_Interface::setMotorsTorque</a></div><div class="ttdeci">void setMotorsTorque(std::vector&lt; double &gt; &amp;tauIn)</div><div class="ttdoc">Set the Motors Torque.</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8cpp_source.html#l00080">MJ_interface.cpp:80</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a91f7d6a50267e9ff1537328a40d68775"><div class="ttname"><a href="classMJ__Interface.html#a91f7d6a50267e9ff1537328a40d68775">MJ_Interface::basePos</a></div><div class="ttdeci">double basePos[3]</div><div class="ttdoc">position of baselink, in world frame</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00029">MJ_interface.h:29</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a62d68e65d389ff62f9c7c95f786f094c"><div class="ttname"><a href="classMJ__Interface.html#a62d68e65d389ff62f9c7c95f786f094c">MJ_Interface::rpy</a></div><div class="ttdeci">double rpy[3]</div><div class="ttdoc">roll,pitch and yaw of baselink</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00026">MJ_interface.h:26</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a2c2a122a4aa9542421e227e6c1722e3e"><div class="ttname"><a href="classMJ__Interface.html#a2c2a122a4aa9542421e227e6c1722e3e">MJ_Interface::motor_pos_Old</a></div><div class="ttdeci">std::vector&lt; double &gt; motor_pos_Old</div><div class="ttdoc">last motor position</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00024">MJ_interface.h:24</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a47e131e382abab397483dfe54045d07b"><div class="ttname"><a href="classMJ__Interface.html#a47e131e382abab397483dfe54045d07b">MJ_Interface::gyroSensorName</a></div><div class="ttdeci">const std::string gyroSensorName</div><div class="ttdoc">gyroscope sensor name</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00044">MJ_interface.h:44</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_aa3e4c8f5df56bd3407a04c0ae6a15d79"><div class="ttname"><a href="classMJ__Interface.html#aa3e4c8f5df56bd3407a04c0ae6a15d79">MJ_Interface::orientationSensorName</a></div><div class="ttdeci">const std::string orientationSensorName</div><div class="ttdoc">orientation sensor name</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00042">MJ_interface.h:42</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a14cefc3f8d3c18ed5b2c435ac7d959ea"><div class="ttname"><a href="classMJ__Interface.html#a14cefc3f8d3c18ed5b2c435ac7d959ea">MJ_Interface::baseQuat</a></div><div class="ttdeci">double baseQuat[4]</div><div class="ttdoc">in quat, mujoco order is [w,x,y,z], here we rearrange to [x,y,z,w]</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00027">MJ_interface.h:27</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_ac13217e183325898b7a7e184470562f0"><div class="ttname"><a href="classMJ__Interface.html#ac13217e183325898b7a7e184470562f0">MJ_Interface::dataBusWrite</a></div><div class="ttdeci">void dataBusWrite(DataBus &amp;busIn)</div><div class="ttdoc">write the updated data to dataBus</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8cpp_source.html#l00085">MJ_interface.cpp:85</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_ab67f241caf2e6ca0388154a2c578d624"><div class="ttname"><a href="classMJ__Interface.html#ab67f241caf2e6ca0388154a2c578d624">MJ_Interface::f3d</a></div><div class="ttdeci">double f3d[3][2]</div><div class="ttdoc">3D foot-end contact force, L for 1st col, R for 2nd col</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00028">MJ_interface.h:28</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_af70216da714e571369d9d176571590a6"><div class="ttname"><a href="classMJ__Interface.html#af70216da714e571369d9d176571590a6">MJ_Interface::updateSensorValues</a></div><div class="ttdeci">void updateSensorValues()</div><div class="ttdoc">update all the sensors value on the robot</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8cpp_source.html#l00052">MJ_interface.cpp:52</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a8673f6877a73148a67de90726d77e01a"><div class="ttname"><a href="classMJ__Interface.html#a8673f6877a73148a67de90726d77e01a">MJ_Interface::MJ_Interface</a></div><div class="ttdeci">MJ_Interface(mjModel *mj_modelIn, mjData *mj_dataIn)</div><div class="ttdoc">Construct a new mj interface object.</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8cpp_source.html#l00010">MJ_interface.cpp:10</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a12b68aed8f3ca981ce80aae25d5c9073"><div class="ttname"><a href="classMJ__Interface.html#a12b68aed8f3ca981ce80aae25d5c9073">MJ_Interface::accSensorName</a></div><div class="ttdeci">const std::string accSensorName</div><div class="ttdoc">acceleration sensor name</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00045">MJ_interface.h:45</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a5e8510564e538fa386a818f6f96a5121"><div class="ttname"><a href="classMJ__Interface.html#a5e8510564e538fa386a818f6f96a5121">MJ_Interface::jointNum</a></div><div class="ttdeci">int jointNum</div><div class="ttdoc">number of joints</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00022">MJ_interface.h:22</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a3323cee5ccf158f098d43752aa0c749c"><div class="ttname"><a href="classMJ__Interface.html#a3323cee5ccf158f098d43752aa0c749c">MJ_Interface::motor_pos</a></div><div class="ttdeci">std::vector&lt; double &gt; motor_pos</div><div class="ttdoc">current motor position</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00023">MJ_interface.h:23</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a6e59db58240c350c3e5fdaa1addcc969"><div class="ttname"><a href="classMJ__Interface.html#a6e59db58240c350c3e5fdaa1addcc969">MJ_Interface::baseName</a></div><div class="ttdeci">const std::string baseName</div><div class="ttdoc">baselink name</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00041">MJ_interface.h:41</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html"><div class="ttname"><a href="classMJ__Interface.html">MJ_Interface</a></div><div class="ttdoc">Mujoco interface controls the interaction between motion controller and mujoco simulation.</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00019">MJ_interface.h:19</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_ad6b575d76a968ffdda312686be04b826"><div class="ttname"><a href="classMJ__Interface.html#ad6b575d76a968ffdda312686be04b826">MJ_Interface::motor_vel</a></div><div class="ttdeci">std::vector&lt; double &gt; motor_vel</div><div class="ttdoc">motor velocity</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00025">MJ_interface.h:25</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_ab5e87c8106ed161dbb4533f20cc35057"><div class="ttname"><a href="classMJ__Interface.html#ab5e87c8106ed161dbb4533f20cc35057">MJ_Interface::velSensorName</a></div><div class="ttdeci">const std::string velSensorName</div><div class="ttdoc">velocity sensor name</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00043">MJ_interface.h:43</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a021529e1a992fa8c4151a3c61b952056"><div class="ttname"><a href="classMJ__Interface.html#a021529e1a992fa8c4151a3c61b952056">MJ_Interface::baseAngVel</a></div><div class="ttdeci">double baseAngVel[3]</div><div class="ttdoc">angular velocity of baselink, in body frame</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00031">MJ_interface.h:31</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a515b7c4b0412a629fd8e2d8b7ff82012"><div class="ttname"><a href="classMJ__Interface.html#a515b7c4b0412a629fd8e2d8b7ff82012">MJ_Interface::baseLinVel</a></div><div class="ttdeci">double baseLinVel[3]</div><div class="ttdoc">linear velocity of baselink, in body frame</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00032">MJ_interface.h:32</a></div></div>
<div class="ttc" id="aclassMJ__Interface_html_a80db73384f82c7fc7509a66e35df0a23"><div class="ttname"><a href="classMJ__Interface.html#a80db73384f82c7fc7509a66e35df0a23">MJ_Interface::baseAcc</a></div><div class="ttdeci">double baseAcc[3]</div><div class="ttdoc">acceleration of baselink, in body frame</div><div class="ttdef"><b>Definition:</b> <a href="MJ__interface_8h_source.html#l00030">MJ_interface.h:30</a></div></div>
<div class="ttc" id="astructDataBus_html"><div class="ttname"><a href="structDataBus.html">DataBus</a></div><div class="ttdoc">The software model for data transporting.</div><div class="ttdef"><b>Definition:</b> <a href="data__bus_8h_source.html#l00022">data_bus.h:22</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
